package com.ruoyi.erp.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.erp.mapper.DingtalkProcessMapper;
import com.ruoyi.erp.domain.DingtalkProcess;
import com.ruoyi.erp.service.IDingtalkProcessService;
import com.ruoyi.common.core.text.Convert;

/**
 * 请假加班Service业务层处理
 * 
 * @author sauger
 * @date 2022-04-18
 */
@Service
public class DingtalkProcessServiceImpl implements IDingtalkProcessService 
{
    @Autowired
    private DingtalkProcessMapper dingtalkProcessMapper;

    /**
     * 查询请假加班
     * 
     * @param id 请假加班主键
     * @return 请假加班
     */
    @Override
    public DingtalkProcess selectDingtalkProcessById(Integer id)
    {
        return dingtalkProcessMapper.selectDingtalkProcessById(id);
    }

    /**
     * 查询请假加班列表
     * 
     * @param dingtalkProcess 请假加班
     * @return 请假加班
     */
    @Override
    public List<DingtalkProcess> selectDingtalkProcessList(DingtalkProcess dingtalkProcess)
    {
        return dingtalkProcessMapper.selectDingtalkProcessList(dingtalkProcess);
    }

    /**
     * 新增请假加班
     * 
     * @param dingtalkProcess 请假加班
     * @return 结果
     */
    @Override
    public int insertDingtalkProcess(DingtalkProcess dingtalkProcess)
    {
        return dingtalkProcessMapper.insertDingtalkProcess(dingtalkProcess);
    }

    /**
     * 修改请假加班
     * 
     * @param dingtalkProcess 请假加班
     * @return 结果
     */
    @Override
    public int updateDingtalkProcess(DingtalkProcess dingtalkProcess)
    {
        return dingtalkProcessMapper.updateDingtalkProcess(dingtalkProcess);
    }

    /**
     * 批量删除请假加班
     * 
     * @param ids 需要删除的请假加班主键
     * @return 结果
     */
    @Override
    public int deleteDingtalkProcessByIds(String ids)
    {
        return dingtalkProcessMapper.deleteDingtalkProcessByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除请假加班信息
     * 
     * @param id 请假加班主键
     * @return 结果
     */
    @Override
    public int deleteDingtalkProcessById(Integer id)
    {
        return dingtalkProcessMapper.deleteDingtalkProcessById(id);
    }
}
